<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>IMYOURS | 企业即时通讯软件</title>

<link rel="stylesheet" href="../css/reset.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/text.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/form.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/buttons.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/grid.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/layout.css" type="text/css"
	media="screen" title="no title" />

<link rel="stylesheet"
	href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/plugin/jquery.visualize.css"
	type="text/css" media="screen" title="no title" />
<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css"
	media="screen" title="no title" />
<link rel="stylesheet" href="../css/plugin/uniform.default.css"
	type="text/css" media="screen" title="no title" />
<link rel="stylesheet" href="../css/plugin/dataTables.css"
	type="text/css" media="screen" title="no title" />

<link rel="stylesheet" href="../css/custom.css" type="text/css"
	media="screen" title="no title">
<style type="text/css">
.team {
	min-height: 429px;
}

.accordion_panel {
	height: 50px;
}
</style>
</head>

<body>

	<div id="wrapper">
		<div id="top">

			<div class="content_pad">
				<ul class="right">
					<li><a href="javascript:;" class="top_icon"><span
							class="ui-icon ui-icon-person" id="useruser"></span></a></li>
					<li><a href="javascript:;" class="new_messages top_alert"
						id="unreadMsgTip"></a></li>
					<li><a href="../pages/settings.html">Settings</a></li>
					<li><a href="javascript:parent.logout();">退出登录</a></li>
				</ul>
			</div>
			<!-- .content_pad -->

		</div>
		<!-- #top -->

		<div id="header">

			<div class="content_pad">
				<h1>
					<a href="../index.html">IMYOURS</a>
				</h1>

				<ul id="nav">
					<li class="nav_icon"><a href="../index.html"><span
							class="ui-icon ui-icon-home"></span>消息中心</a></li>

					<li class="nav_icon"><a href="friendList.html"><span
							class="ui-icon ui-icon-gripsmall-diagonal-se"></span>好友列表</a></li>

					<li class="nav_icon"><a href="../pages/companyStruct.html"><span
							class="ui-icon ui-icon-gear"></span>公司结构</a></li>
					<li class="nav_dropdown nav_current nav_icon"><a
						href="../pages/admin.html"><span
							class="ui-icon ui-icon-signal"></span>管理页</a></li>


				</ul>
			</div>
			<!-- .content_pad -->

		</div>
		<!-- #header -->

		<div id="masthead">

			<div class="content_pad">

				<h1 class="">管理页</h1>

				<div id="bread_crumbs">
					<a href="../index.html">消息中心</a> / <a href="javascript:;"
						class="current_page">管理页</a>
				</div>
				<!-- #bread_crumbs -->

				<div id="search">
					<form action="/search" method="get">
						<input type="text" value="" placeholder="Search" name="search"
							id="search_input" title="Search" /> <input type="submit"
							value="" name="submit" class="submit" />
					</form>
				</div>
				<!-- #search -->

			</div>
			<!-- .content_pad -->

		</div>
		<!-- #masthead -->

		<div id="content" class="xgrid">
			<div class="x3">
				<ul>
					<li><a href="javascript:updateUserInfo();">修改个人资料</a></li>
					<li><a href="javascript:changPwd();">修改密码</a></li>
					<li><a herf="javascript:;">添加用户</a></li>
				</ul>

			</div>




		</div>
		<!-- #content -->

		<div id="footer">
			<div class="content_pad">
				<p>
					&copy; 2010-11 Copyright <a href="http://weibo.com/slevenc">Slevenc</a>.
					Powered by <a href="http://madebyamp.com/themes/dashboard/">Dashboard
						Admin</a>.
				</p>
			</div>
			<!-- .content_pad -->
		</div>
		<!-- #footer -->

	</div>
	<!-- #wrapper -->

	<script src="../js/jquery/jquery-1.5.2.min.js"></script>
	<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
	<script src="../js/misc/excanvas.min.js"></script>
	<script src="../js/jquery/facebox.js"></script>
	<script src="../js/jquery/jquery.visualize.js"></script>
	<script src="../js/jquery/jquery.dataTables.min.js"></script>
	<script src="../js/jquery/jquery.tablesorter.min.js"></script>
	<script src="../js/jquery/jquery.uniform.min.js"></script>
	<script src="../js/jquery/jquery.placeholder.min.js"></script>
	<script src="../js/init.js"></script>
	<script src="../js/json2.js"></script>
	<script src="../js/var.js"></script>


	<script src="../js/widgets.js"></script>
	<script src="../js/dashboard.js"></script>

	<script>
		$(document).ready(
				function() {

					getUnreadMsgCount();
					Dashboard.init();

					setTimeout('getUnreadMsgCount()', 1000);

					$("#useruser").after(parent.userInfo.user.nickname);
					$('.accordion_container').accordion();

					$('.tab_container').tabs();

					$('#datepicker').datepicker();

					$("#progressbar").progressbar({
						value : 59
					});

					$('#slider-range').slider(
							{
								range : true,
								min : 0,
								max : 500,
								values : [ 75, 300 ],
								slide : function(event, ui) {
									$("#amount").val(
											"$" + ui.values[0] + " - $"
													+ ui.values[1]);
								}
							});

					$("#amount").val(
							"$" + $("#slider-range").slider("values", 0)
									+ " - $"
									+ $("#slider-range").slider("values", 1));
				});

	function updateUserInfo(){
		var dialogDiv = $("<div>")
		dialogDiv.attr("title","修改个人资料");
		var attrsDiv = $('<div>');
		$.each(parent.userInfo.user,function(k,v){
			if(k!='admin'){}
			var lb = $("<span>");
			lb.text(k);
			//var fs = $('<span>');
			var fi = $('<input type="text"/>');
			fi.attr('name',k);
			fi.attr('value',v);
			lb.append(fi);
			attrsDiv.append($('<div>').append(lb));
		
			//attrsDiv.append(fs);
		});
		var commitBD = $('<div>');
		var cb = $('<button class="btn btn-orange">提交</button>');
		cb.click(function(){
			alert('xt');
		});
		commitBD.append(cb);
		dialogDiv.append(attrsDiv);
		dialogDiv.append(commitBD);
		
		$('#content').append(dialogDiv);
		dialogDiv.dialog({close:function(){
			dialogDiv.remove();
		}});
	}
	
	
	function changPwd(){
		var dDiv =$('<div>');
		dDiv.attr("title","修改密码");
	var t=$('<table><tr><td>原密码</td><td><input name="oldPwd"></input></td></tr><tr><td>新密码</td><td><input name="newPwd"></input></td></tr><tr><td><input type="hidden" name="sessionId" value="'+parent.sid+'"></input><input type="hidden" name="service" value="changePwd"></input></td><td><button class="btn btn-orange">修改</button></td></tr></table>');
		dDiv.append(t);
		dDiv.dialog({
			close:function(){
				dDiv.remove();
			}
		});
	}

		function getUnreadMsgCount() {
			count = parent.unReadMsgBox.length;
			if (count == 0) {
				$("#unreadMsgTip").text('没有未读的消息');
			} else {
				$("#unreadMsgTip").text('您有' + count + '条新消息');
			}
			setTimeout('getUnreadMsgCount()', 1000);
		}

		
	</script>

</body>

</html>